Skip to content

Conversation

@ahejlsberg
Copy link
Member

Fixes #2014.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request fixes a bug in the parseTypeParameter function where node finalization was happening before all child nodes were properly attached.

  • Reorders finishNode call to occur after setting the Expression field on type parameters

@jakebailey
Copy link
Member

Why did our parent tests not catch this I wonder?

@jakebailey
Copy link
Member

Actually, I'm confused; doesn't the code behave the same before/after?

@ahejlsberg
Copy link
Member Author

Actually, I'm confused; doesn't the code behave the same before/after?

No, finishNode sets the parent of the current children of the node and we would jam in the Expression after the call. We now set Expression before we parent the children.

@ahejlsberg ahejlsberg added this pull request to the merge queue Nov 4, 2025
Merged via the queue into main with commit 3649a9c Nov 4, 2025
28 checks passed
@ahejlsberg ahejlsberg deleted the fix-2014 branch November 4, 2025 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

parse diagnostic panic - null pointer dereference

3 participants